package com.ldq.imooc.basics.io;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * @Author : 李道泉
 * @Description :
 * @Date : 2018/4/17 13:11
 * @Modified by :
 */
public class DisDemo {

    public static void main(String[] args) throws IOException {

        String file = "demo/dos.dat";
        IOUtil.printHex(file);
        DataInputStream dis = new DataInputStream(new FileInputStream(file));

        int i = dis.readInt();
        System.out.println(i);
        long l = dis.readLong();
        System.out.println(l);
        String s = dis.readUTF();
        System.out.println(s);
        dis.close();
    }
}
